home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Graphics / Viewers / PDFView.1.41 / PDFView.app / pdfpkg.procset < prev    next >
Encoding:
Text File  |  1996-04-01  |  26.7 KB  |  770 lines

  1. %!
  2. %%Copyright: Copyright 1995 Guenther Fuerthaller. All Rights Reserved.
  3. /currentpacking where {pop currentpacking true setpacking}if
  4. %/L2 false def /where {dup /colorimage eq {pop false} {where} ifelse} bind def
  5. /L2 /languagelevel where {pop languagelevel 2 ge} {false} ifelse def
  6. /packedarray where {pop} {/packedarray {array astore readonly} bind def} ifelse
  7. /isarray {type dup /arraytype eq exch /packedarraytype eq or} bind def
  8. /hardbind
  9. {    dup xcheck exch [ exch
  10.     {    dup xcheck
  11.         {    dup type /nametype eq
  12.             {dup where {exch get dup xcheck {dup isarray {/exec load} if} if} if}
  13.             {dup isarray {hardbind} if}
  14.             ifelse
  15.         } if
  16.     } forall
  17.     counttomark packedarray exch pop exch {cvx} if
  18. } bind def
  19. systemdict /nextimage known
  20. {
  21. %% bug in the next windowserver: CCITTFax filters don't work and SubFileDecode has a limit of 65535
  22.     /repairfilterbugsdict 2 dict def
  23.     repairfilterbugsdict begin
  24.     revision 125 lt {/CCITTFaxDecode {pop pop pop 500 string 1 packedarray cvx 0 () /SubFileDecode} hardbind def} if
  25.     /SubFileDecode
  26.     {    2 index 65535 gt 2 index length 0 eq and
  27.         {    4 2 roll
  28.             4 dict begin /datalenstr 20 string def /emptystr 20 string def /bufstr 65535 string def
  29.             /datalenstr load cvs pop /inputfile exch dup type /filetype ne {0 () /SubFileDecode filter} if def
  30.             /emptystr load /datalenstr load /inputfile load cvlit /bufstr load
  31.             end
  32.             {    2 index cvi dup 2 index length lt {0 exch getinterval 0} {1 index length sub} ifelse
  33.                 5 -2 roll copy cvs pop dup length 0 gt {readstring} {exch} ifelse pop
  34.             }
  35.             aload length 4 add packedarray cvx 0 4 -2 roll
  36.         } if
  37.     } hardbind def
  38.     end
  39.     /filter
  40.     {    repairfilterbugsdict 1 index known
  41.         {repairfilterbugsdict 1 index get exec} if
  42.         filter
  43.     } hardbind def
  44.     version cvr 2015 ge
  45.     {    %/setcolorspace
  46.         %{    dup dup isarray {0 get} if
  47.         %    /CIEBasedA eq {[/Separation /Dummy 4 -1 roll {}]} if
  48.         %    setcolorspace
  49.         %} hardbind def 
  50.         /setcolor
  51.         {    currentcolorspace 0 get /CIEBasedA eq
  52.             {    [/Indexed currentcolorspace 4095 {4095 div}] setcolorspace
  53.                 4095 mul
  54.             } if
  55.             setcolor
  56.         } hardbind def
  57.         /image
  58.         {    dup type /dicttype eq
  59.             {    currentcolorspace 0 get /CIEBasedA eq
  60.                 {    currentcolor setcolor
  61.                     0 dict copy begin
  62.                     /Decode [/Decode load {currentcolorspace 2 get mul} forall] def
  63.                     currentdict end
  64.                 } if
  65.             } if
  66.             image
  67.         } hardbind def
  68.     } if
  69. } if
  70. /NextStepEncoding where
  71. {    pop
  72.     /nxfindfont /findfont load def
  73.     /CopyOfStandardEncoding StandardEncoding dup length array copy def
  74.     /findfont
  75.     {    /currentshared where {pop currentshared} {false} ifelse
  76.          {nxfindfont}
  77.         {    dup nxfindfont
  78.             dup /Encoding get NextStepEncoding eq
  79.             {    dup length dict begin
  80.                 {1 index /FID ne {def} {pop pop} ifelse} forall
  81.                 /Encoding CopyOfStandardEncoding def
  82.                 currentdict end definefont
  83.             }
  84.             {exch pop}
  85.             ifelse
  86.         }
  87.         ifelse
  88.     } bind def
  89. } if
  90. /product where {pop product} {(unknown)} ifelse
  91. (Ghostscript) search exch pop
  92. {    pop pop
  93. %% In some cases ASCIIHexDecode filter doesn't read the eof marker
  94.     /repairfilterbugsdict 1 dict def
  95.     repairfilterbugsdict begin
  96.     /ASCIIHexDecode
  97.     {    filter
  98.         3 dict begin
  99.         /src exch def
  100.         /state 1 string dup 0 0 put def
  101.         /buf 501 string def
  102.         [    currentdict end
  103.             {    begin
  104.                 {    {    /state load 0 1 put
  105.                         /src load /buf load readstring
  106.                         {0 500 getinterval}
  107.                         {/state load 0 2 put /src load closefile}
  108.                         ifelse
  109.                     }
  110.                     {    /src load /buf load dup 0 1 index 500 get put 1 500 getinterval readstring
  111.                         {pop 500}
  112.                         {length 1 add /state load 0 2 put /src load closefile}
  113.                         ifelse
  114.                         /buf load 0 3 -1 roll getinterval
  115.                     }
  116.                     {()}
  117.                 }
  118.                 /state load 0 get get exec
  119.                 end
  120.             } /exec cvx
  121.         ] cvx 0 () /SubFileDecode
  122.     } hardbind def
  123.     end
  124.     /filter
  125.     {    repairfilterbugsdict 1 index known
  126.         {repairfilterbugsdict 1 index get exec} if
  127.         filter
  128.     } hardbind def
  129. } if
  130. L2 not
  131. {    /setcmykcolor where
  132.     {pop}
  133.     {    /setcmykcolor
  134.         {1 sub 4 1 roll 3 {3 index add neg dup 0 lt { pop 0 } if 3 1 roll} repeat setrgbcolor pop} hardbind def
  135.     }
  136.     ifelse
  137.     /rectclip where
  138.     {pop}
  139.     {    /rectclip
  140.         {4 2 roll moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath clip newpath} hardbind def
  141.     }
  142.     ifelse
  143.     /UserObjects 10 array def
  144.     /defineuserobject
  145.     {    exch dup 1 add dup /UserObjects load length gt
  146.         {array dup 0 /UserObjects load putinterval /UserObjects exch store} {pop} ifelse
  147.         /UserObjects load exch 3 -1 roll put
  148.     } hardbind def
  149.     /undefineuserobject {/UserObjects load exch null put} hardbind def
  150.     /execuserobject {/UserObjects load exch get exec} hardbind def
  151. } if
  152.  
  153. mark /AHx /ASCIIHexDecode /A85 /ASCII85Decode /CCF /CCITTFaxDecode
  154. /DCT /DCTDecode /LZW /LZWDecode /RL /RunLengthDecode
  155. counttomark 2 idiv dup dict begin {def} repeat currentdict end /ShrtFN exch def pop
  156. mark /CMYK /DeviceCMYK /G /DeviceGray /RGB /DeviceRGB /I /Indexed /CG /CalGray /CR /CalRGB /CC /CalCMYK
  157. counttomark 2 idiv dup dict begin {def} repeat currentdict end /ShrtCSN exch def pop
  158. mark /W /Width /H /Height /BPC /BitsPerComponent /CS /ColorSpace /F /Filter
  159. /I /Interpolate /IM /ImageMask /D /Decode /DP /DecodeParms
  160. counttomark 2 idiv dup dict begin {def} repeat currentdict end /imgparaabrevdict exch def pop
  161. /buildimagedict
  162. {    counttomark 2 idiv dup 10 add dict begin
  163.     {    imgparaabrevdict 2 index known {imgparaabrevdict 3 -1 roll get exch} if
  164.         1 index /ColorSpace eq
  165.         {    dup type /nametype eq
  166.             {ShrtCSN 1 index known {ShrtCSN exch get} if}
  167.             {dup 0 /Indexed put dup 1 2 copy get ShrtCSN 1 index known {ShrtCSN exch get} if put}
  168.             ifelse
  169.         } if
  170.         1 index /Filter eq
  171.         {    dup isarray
  172.             {[exch {ShrtFN 1 index known {ShrtFN exch get} if} forall]}
  173.             {ShrtFN 1 index known {ShrtFN exch get} if}
  174.             ifelse
  175.         } if
  176.         def
  177.     } repeat cleartomark currentdict end
  178. } hardbind def
  179.  
  180. /numcolorspacecomponents 8 dict def
  181. numcolorspacecomponents begin
  182. /DeviceGray 1 def
  183. /DeviceRGB 3 def
  184. /DeviceCMYK 4 def
  185. /CIEBasedABC 3 def
  186. /CIEBasedA 1 def
  187. /Pattern 1 def
  188. /Indexed 1 def
  189. /Separation 1 def
  190. end
  191.  
  192. /pdfpkg 200 dict def
  193. pdfpkg begin
  194.  
  195. /pdfpkgget {pdfpkg exch get} hardbind def
  196. /pdfpkgput {pdfpkg 3 1 roll put} hardbind def
  197. /pdfpkgexec {pdfpkgget exec} hardbind def
  198.  
  199. /cmtmpmat matrix def
  200. /clipper {} def
  201. /fillcolorspace null def
  202. /strokecolorspace null def
  203. /fillcolor null def
  204. /fillcolorarrays [null [0] null [0 0 0] [0 0 0 0]] def
  205. /strokecolor null def
  206. /strokecolorarrays [null [0] null [0 0 0] [0 0 0 0]] def
  207. /mustinstallfillcolor true def
  208. /mustinstallstrokecolor true def
  209. /InText false def
  210. /TextLeading 0 def
  211. /TextRise 0 def
  212. /TextCharSpacing 0 def
  213. /TextWordSpacing 0 def
  214. /TextRendering 0 def
  215. /TextHScale 1 def
  216. /TextSize 1 def
  217. /TextMatrix matrix def
  218. /TextBaseMatrix matrix def
  219.  
  220. /_q null def
  221. /q {/_q save pdfpkgput} hardbind def
  222. /Q {/_q pdfpkgget restore} hardbind def
  223.  
  224. /cs
  225. {    load /fillcolorspace 1 index pdfpkgput
  226.     /fillcolor fillcolorarrays numcolorspacecomponents 4 -1 roll 0 get get get pdfpkgput
  227.     /mustinstallfillcolor true pdfpkgput
  228. } hardbind def
  229. /CS
  230. {    load /strokecolorspace 1 index pdfpkgput
  231.     /strokecolor strokecolorarrays numcolorspacecomponents 4 -1 roll 0 get get get pdfpkgput
  232.     /mustinstallstrokecolor true pdfpkgput
  233. } hardbind def
  234. /sc
  235. {    /fillcolor pdfpkgget astore pop
  236.     /mustinstallfillcolor true pdfpkgput
  237. } hardbind def
  238. /SC
  239. {    /strokecolor pdfpkgget astore pop
  240.     /mustinstallstrokecolor true pdfpkgput
  241. } hardbind def
  242. /g {/DefaultGray cs sc} hardbind def
  243. /G {/DefaultGray CS SC} hardbind def
  244. /rg {/DefaultRGB cs sc} hardbind def
  245. /RG {/DefaultRGB CS SC} hardbind def
  246. /k {/DeviceCMYK cs sc} hardbind def
  247. /K {/DeviceCMYK CS SC} hardbind def
  248. /pc {/DefaultGray cs pop 0.5 sc} hardbind def
  249. /PC {/DefaultGray CS pop 0.5 SC} hardbind def
  250. L2
  251. {    /pkgsetcolorspace /setcolorspace load def
  252.     /pkgsetcolor /setcolor load def
  253.     /pkgimage /image load def
  254.     /pkgimagemask /imagemask load def
  255. }
  256. {    /pkgsetcolorspacedict 4 dict def
  257.     /pkgsetcolorspace {dup isarray {0 get} if pkgsetcolorspacedict exch get {aload pop pdfpkgput} forall} hardbind def
  258.     /pkgsetcolor null def
  259.     /pkgimage null def
  260.     /pkgimagemask
  261.     {    begin {/Width /Height /ImageMatrix /DataSource} {load} forall /Decode load 0 get 0 ne 3 1 roll end
  262.         imagemask
  263.     } hardbind def
  264.     /pushimageparams {begin {/Width /Height /BitsPerComponent /ImageMatrix /DataSource} {load} forall end} hardbind def
  265.     /pkggrayimage {pushimageparams image} hardbind def
  266.     /pkgimageworkbuf 65535 string def
  267.     /havecolorimage /colorimage where {pop true} {false} ifelse def
  268.     havecolorimage not {save} if
  269.     /pkgrgbimage {pushimageparams false 3 colorimage} hardbind def
  270.     /pkgcmykimage {pushimageparams false 4 colorimage} hardbind def
  271.     havecolorimage not {restore} if
  272.     havecolorimage {save} if
  273.     /NTSCSUM {.11 mul exch .59 mul add exch .3 mul add} hardbind def
  274.     /rgbtogray8Bit {NTSCSUM round cvi} hardbind def
  275.     /cmyktogray8Bit {4 1 roll NTSCSUM add dup 255 gt {pop 0} {255 exch sub} ifelse round cvi} hardbind def
  276.     /pkgrgbimage
  277.     {    pushimageparams
  278.         {    {exec pkgimageworkbuf 0 3 -1 roll length 8 mul 3 idiv getinterval}
  279.             {exec pkgimageworkbuf 0 3 -1 roll length 4 mul 3 idiv getinterval}
  280.             {exec pkgimageworkbuf 0 3 -1 roll length 2 mul 3 idiv getinterval}
  281.             null
  282.             {    exec 0 1 2 index length 3 idiv 1 sub
  283.                 {2 copy 3 mul 3 getinterval {} forall rgbtogray8Bit pkgimageworkbuf 3 1 roll put} for
  284.                 pkgimageworkbuf 0 3 -1 roll length 3 idiv getinterval
  285.             }
  286.         }
  287.         3 index 2 idiv get aload length 1 add packedarray cvx image
  288.     } hardbind def
  289.     /pkgcmykimage
  290.     {    pushimageparams
  291.         {    {exec pkgimageworkbuf 0 3 -1 roll length 2 mul getinterval}
  292.             {exec pkgimageworkbuf 0 3 -1 roll length getinterval}
  293.             {    exec 0 1 2 index length 2 idiv 1 sub
  294.                 {    2 copy 2 mul 2 getinterval {} forall
  295.                     exch dup -4 bitshift 15 and exch 15 and 3 -1 roll dup -4 bitshift 15 and exch 15 and
  296.                     4 {17 mul 4 1 roll} repeat
  297.                     cmyktogray8Bit pkgimageworkbuf 3 1 roll put
  298.                 } for
  299.                 pkgimageworkbuf 0 3 -1 roll length 2 idiv getinterval
  300.             }
  301.             null
  302.             {    exec 0 1 2 index length 4 idiv 1 sub
  303.                 {2 copy 4 mul 4 getinterval {} forall cmyktogray8Bit pkgimageworkbuf 3 1 roll put} for
  304.                 pkgimageworkbuf 0 3 -1 roll length 4 idiv getinterval
  305.             }
  306.         }
  307.         3 index 2 idiv get aload length 1 add packedarray cvx image
  308.     } hardbind def
  309.     havecolorimage {restore} if
  310.     /pkgimagebuf null def
  311.     /pkgimagestripcnt 0 def
  312.     /pkgindexedimageprocdict 3 dict def
  313.     pkgindexedimageprocdict begin
  314.     /DeviceGray
  315.     {    exec pkgimageworkbuf 0 2 index length getinterval 0 3 -1 roll
  316.         {    3 index exch get
  317.             3 copy put pop 1 add
  318.         } forall pop exch pop
  319.     } hardbind def
  320.     /DeviceRGB
  321.     {    exec pkgimageworkbuf 0 2 index length 3 mul getinterval 0 3 -1 roll
  322.         {    3 index exch 3 mul 3 getinterval
  323.             3 copy putinterval pop 3 add
  324.         } forall pop exch pop
  325.     } hardbind def
  326.     /DeviceCMYK
  327.     {    exec pkgimageworkbuf 0 2 index length 4 mul getinterval 0 3 -1 roll
  328.         {    3 index exch 4 mul 4 getinterval
  329.             3 copy putinterval pop 4 add
  330.         } forall pop exch pop
  331.     } hardbind def
  332.     end
  333.     /normalizelookup
  334.     {    8 dict begin
  335.         /numdestcomps numcolorspacecomponents ColorSpace 1 get dup isarray {0 get} if get def
  336.         /numindices 2 BitsPerComponent exp cvi def
  337.         /maxval numindices 1 sub def
  338.         /decodescale Decode aload pop exch sub maxval div def
  339.         /decodemin Decode 0 get def
  340.         /hival ColorSpace 2 get def
  341.         /srclookup ColorSpace 3 get def
  342.         decodemin 0 ne decodescale 1 ne or hival maxval ne or
  343.         {    /dstlookup numdestcomps numindices mul string def
  344.             0 1 maxval
  345.             {    dup numdestcomps mul exch decodescale mul decodemin add
  346.                 0 2 copy lt {exch} {pop hival 2 copy gt {exch} if} ifelse pop cvi
  347.                 numdestcomps mul numdestcomps srclookup 3 1 roll getinterval
  348.                 dstlookup 3 1 roll putinterval
  349.             } for
  350.             ColorSpace 2 maxval put ColorSpace 3 dstlookup put
  351.             0 maxval Decode astore pop
  352.         } if
  353.         end
  354.     } bind def
  355.     /pkgindexedimage
  356.     {    begin
  357.         normalizelookup
  358.         havecolorimage not /ColorSpace load 1 get dup isarray {0 get} if /DeviceGray ne and
  359.         {    /ColorSpace load 1 get dup isarray {0 get} if /DeviceRGB eq
  360.             {    0 1 /ColorSpace load 2 get
  361.                 {    dup 3 mul 3 /ColorSpace load 3 get 3 1 roll getinterval {} forall rgbtogray8Bit
  362.                     /ColorSpace load 3 get 3 1 roll put
  363.                 } for
  364.             }
  365.             {    0 1 /ColorSpace load 2 get
  366.                 {    dup 4 mul 4 /ColorSpace load 3 get 3 1 roll getinterval {} forall cmyktogray8Bit
  367.                     /ColorSpace load 3 get 3 1 roll put
  368.                 } for
  369.             }
  370.             ifelse
  371.             /ColorSpace load 3 2 copy get 0 3 index 2 get 1 add getinterval put
  372.             /ColorSpace load 1 /DeviceGray put
  373.         } if
  374.         /ColorSpace load 3 get /DataSource load
  375.         pkgindexedimageprocdict /ColorSpace load 1 get dup isarray {0 get} if get
  376.         aload length 2 add packedarray cvx /DataSource exch def
  377.         /ColorSpace dup load 1 get def
  378.         /ColorSpace load pkgsetcolorspace currentdict end /pkgimage pdfpkgexec
  379.     } hardbind def
  380.     pkgsetcolorspacedict begin
  381.     /DeviceGray [[/pkgsetcolor /setgray load] [/pkgimage /pkggrayimage load]] def
  382.     /DeviceRGB [[/pkgsetcolor /setrgbcolor load] [/pkgimage /pkgrgbimage load]] def
  383.     /DeviceCMYK [[/pkgsetcolor /setcmykcolor load] [/pkgimage /pkgcmykimage load]] def
  384.     /Indexed [[/pkgsetcolor null] [/pkgimage /pkgindexedimage load]] def
  385.     end
  386. }
  387. ifelse
  388. /installfillcolor
  389. {    /mustinstallfillcolor pdfpkgget
  390.     {    /fillcolorspace pdfpkgget /pkgsetcolorspace pdfpkgexec
  391.         /fillcolor pdfpkgget aload pop /pkgsetcolor pdfpkgexec
  392.         /mustinstallfillcolor false pdfpkgput
  393.         /mustinstallstrokecolor true pdfpkgput
  394.     } if
  395. } hardbind def
  396. /installstrokecolor
  397. {    /mustinstallstrokecolor pdfpkgget
  398.     {    /strokecolorspace pdfpkgget /pkgsetcolorspace pdfpkgexec
  399.         /strokecolor pdfpkgget aload pop /pkgsetcolor pdfpkgexec
  400.         /mustinstallstrokecolor false pdfpkgput
  401.         /mustinstallfillcolor true pdfpkgput
  402.     } if
  403. } hardbind def
  404.  
  405. /cm {cmtmpmat astore concat} hardbind def
  406. /n {/clipper pdfpkgexec /clipper {} pdfpkgput newpath} hardbind def
  407. /N /n load def
  408. /W {/clipper {clip} pdfpkgput} hardbind def
  409. /W* {/clipper {eoclip} pdfpkgput} hardbind def
  410. /f {/installfillcolor pdfpkgexec q fill Q n} hardbind def
  411. /f* {/installfillcolor pdfpkgexec q eofill Q n} hardbind def
  412. /F /f load def
  413. /F* /f* load def
  414. /S {/installstrokecolor pdfpkgexec q stroke Q n} hardbind def
  415. /s {h S} hardbind def
  416. /B {q f Q S} hardbind def
  417. /B* {q f* Q S} hardbind def
  418. /b {h B} hardbind def
  419. /b* {h B*} hardbind def
  420. /re {4 2 roll m 1 index 0 rlineto 0 exch rlineto neg 0 rlineto h} hardbind def
  421. /ri
  422. {    /findcolorrendering where
  423.     {    pop findcolorrendering pop dup /ColorRendering resourcestatus
  424.         {pop pop /ColorRendering findresource setcolorrendering} {pop} ifelse
  425.     }
  426.     {pop}
  427.     ifelse
  428. } hardbind def
  429. /PS {/pdfdebug where {/pdfdebug get} {false} ifelse {(/PS: ) print dup == flush} if pop} hardbind def
  430.  
  431. /m /moveto load def
  432. /l /lineto load def
  433. /c /curveto load def
  434. /v {currentpoint 6 2 roll c } hardbind def
  435. /y {2 copy c} hardbind def
  436. /h /closepath load def
  437. /d /setdash load def
  438. /j /setlinejoin load def
  439. /J /setlinecap load def
  440. /M /setmiterlimit load def
  441. /w /setlinewidth load def
  442. /defaultflat currentflat def
  443. /i {dup 0 eq {pop defaultflat} if setflat} hardbind def
  444. /d0 /setcharwidth load def
  445. /d1 {setcachedevice /installfillcolor {} pdfpkgput /installstrokecolor {} pdfpkgput} hardbind def
  446.  
  447. /BI {q mark} hardbind def
  448. /EI /Q load def
  449. /DI
  450. {    begin
  451.     /ImageType 1 def
  452.     /ImageMatrix [Width 0 0 Height neg 0 Height] def
  453.     currentdict /ImageMask known not    {/ImageMask false def} if
  454.     ImageMask
  455.     {/installfillcolor pdfpkgexec}
  456.     {    ColorSpace
  457.         dup isarray
  458.         {dup 0 get /Indexed eq {dup 1 2 copy get dup where {pop load} if put} if}
  459.         {dup where {pop load} if}
  460.         ifelse
  461.         /ColorSpace 1 index def
  462.         /pdfdebug where {/pdfdebug get} {false} ifelse
  463.         {    (imagecolorspace: ) print dup ==
  464.             (BitsPerComponent: ) print BitsPerComponent ==
  465.             flush
  466.         } if
  467.         /pkgsetcolorspace pdfpkgexec
  468.     }
  469.     ifelse
  470.     currentdict /Intent known
  471.     {Intent /pdfdebug where {/pdfdebug get} {false} ifelse {(Intent: ) print dup == flush} if ri} if
  472.     currentdict /Decode known not
  473.     {    /Decode
  474.         [    ImageMask
  475.             {0 1}
  476.             {    ColorSpace dup isarray {0 get} if /Indexed eq
  477.                 {0 2 BitsPerComponent exp 1 sub}
  478.                 {numcolorspacecomponents ColorSpace dup isarray {0 get} if get {0 1} repeat} ifelse
  479.             } ifelse
  480.         ] def
  481.     } if
  482.     L2 not
  483.     {    /pkgimagestripcnt Height pdfpkgput
  484.         /pkgimagebuf
  485.         Width ImageMask not
  486.         {    numcolorspacecomponents ColorSpace dup isarray {0 get} if get
  487.             mul BitsPerComponent mul
  488.         } if
  489.         7 add 8 idiv string pdfpkgput
  490.     } if
  491.     currentdict /DataSource known
  492.     {    L2 not
  493.         {    /DataSource load isarray not
  494.             {/DataSource dup load {pkgimagebuf readstring pop} aload length 1 add packedarray cvx def} if
  495.         } if
  496.     } 
  497.     {    L2
  498.         {    currentfile
  499.             currentdict /Filter known
  500.             {    Filter dup isarray {length} {pop 1} ifelse
  501.                 1 sub 0 1 3 -1 roll
  502.                 {    currentdict /DecodeParms known
  503.                     {DecodeParms dup isarray {1 index get} if dup null eq {pop} {exch} ifelse} if
  504.                     Filter dup isarray {exch get} {exch pop} ifelse
  505.                     filter
  506.                 } for
  507.             } if
  508.         }
  509.         {    currentdict /Filter known
  510.             {    Filter dup isarray
  511.                 {dup length 1 ne {(Image uses unsupported cascading filters: ) print flush Filter == flush quit} if 0 get} if
  512.                 /ASCIIHexDecode ne {(Image uses unsupported filter: ) print Filter == flush quit} if
  513.                 {    /pkgimagestripcnt pdfpkgget 0 gt
  514.                     {    currentfile pkgimagebuf readhexstring pop
  515.                         /pkgimagestripcnt dup pdfpkgget 1 sub dup 0 eq
  516.                         {{currentfile read {62 eq} {true} ifelse {exit} if} loop} if
  517.                         pdfpkgput
  518.                     }
  519.                     {()}
  520.                     ifelse
  521.                 }
  522.             }
  523.             {{currentfile pkgimagebuf readstring pop}}
  524.             ifelse
  525.         }
  526.         ifelse
  527.         /DataSource exch def
  528.     }
  529.     ifelse
  530.     currentdict ImageMask end {/pkgimagemask} {/pkgimage} ifelse pdfpkgexec
  531. } bind def
  532. /ID {buildimagedict DI} def
  533.  
  534.  
  535. /awidthparams {/TextWordSpacing pdfpkgget 0 32 /TextCharSpacing pdfpkgget 0 6 -1 roll} hardbind def
  536. /cshow where {pop} {/cshow {[0 0 5 -1 roll {exec} aload pop] cvx forall} hardbind def} ifelse
  537. /awidthcharpath    % cx cy char ax ay bool string awidthcharpath
  538. {    {    pop pop (0) dup 0 3 index put 2 index charpath
  539.         4 index eq {5 index 5 index rmoveto} if
  540.         2 index 2 index rmoveto
  541.     } exch cshow
  542.     pop pop pop pop pop pop
  543. } hardbind def
  544. /filltext {/installfillcolor pdfpkgexec awidthparams awidthshow} hardbind def
  545. /stroketext
  546. {    /installstrokecolor pdfpkgexec awidthparams false exch awidthcharpath
  547.     currentpoint cmtmpmat currentmatrix TextBaseMatrix setmatrix stroke setmatrix moveto
  548. } hardbind def
  549. /fillandstroketext {currentpoint 2 index filltext newpath moveto stroketext} hardbind def
  550. /appendtextpath {awidthparams false exch awidthcharpath} hardbind def
  551. /textprocs
  552. [/filltext load
  553. /stroketext load
  554. /fillandstroketext load
  555. {q nulldevice filltext currentpoint Q newpath moveto} hardbind
  556. {q dup filltext Q appendtextpath} hardbind
  557. {q dup stroketext Q appendtextpath} hardbind
  558. {q dup fillandstroketext Q appendtextpath} hardbind
  559. /appendtextpath load
  560. ] def
  561. /Tj {textprocs /TextRendering pdfpkgget get exec} hardbind def
  562. /inittextmatrix
  563. {    TextBaseMatrix setmatrix TextMatrix concat
  564.     0 /TextRise pdfpkgget translate /TextHScale pdfpkgget 1 scale
  565. } hardbind def
  566. /Tf {/TextSize 1 index pdfpkgput exch findfont exch scalefont setfont} hardbind def
  567. /Tw {/TextWordSpacing exch pdfpkgput} hardbind def
  568. /Tc {/TextCharSpacing exch pdfpkgput} hardbind def
  569. /TL {neg /TextLeading exch pdfpkgput} hardbind def
  570. /Ts {/TextRise exch pdfpkgput currentpoint inittextmatrix moveto} hardbind def
  571. /Tz {100 div /TextHScale exch pdfpkgput inittextmatrix} hardbind def
  572. /Tr
  573. {    /InText pdfpkgget {/TextRendering pdfpkgget 3 le {currentpoint newpath moveto} if} if
  574.     /pdfdebug where {/pdfdebug get} {false} ifelse {dup 0 ne {(TextRendering set to: ) print dup == flush} if} if
  575.     /TextRendering exch pdfpkgput
  576. } hardbind def
  577. /Td {cmtmpmat translate TextMatrix dup concatmatrix pop inittextmatrix 0 0 moveto} hardbind def
  578. /TD {/TextLeading 1 index pdfpkgput Td} hardbind def
  579. /T* {0 /TextLeading pdfpkgget Td} hardbind def
  580. /" {exch Tc exch Tw T* Tj} hardbind def
  581. /' {0 0 3 -1 roll "} hardbind def
  582. /TJ {{dup type /stringtype eq {Tj} {1000 div /TextSize pdfpkgget mul neg 0 rmoveto} ifelse} forall} hardbind def
  583. /Tm {TextMatrix astore pop inittextmatrix 0 0 moveto} hardbind def
  584. /BT
  585. {    /InText true pdfpkgput
  586.     TextBaseMatrix currentmatrix pop TextMatrix identmatrix pop inittextmatrix newpath 0 0 moveto
  587. } hardbind def
  588. /ET
  589. {    /TextRendering pdfpkgget 3 gt {clip} if TextBaseMatrix setmatrix newpath
  590.     /InText false pdfpkgput
  591. } hardbind def
  592.  
  593. /reencodeenc null def
  594. /reencodeindex null def
  595. /reencode
  596. {    /reencodeenc exch pdfpkgput /reencodeindex 0 pdfpkgput
  597.     counttomark 1 sub -1 0
  598.     {    index dup type /nametype eq
  599.         {/reencodeenc pdfpkgget /reencodeindex pdfpkgget 3 -1 roll put /reencodeindex pdfpkgget 1 add} if
  600.         /reencodeindex exch pdfpkgput
  601.     } for
  602.     cleartomark /reencodeenc pdfpkgget
  603. } bind def
  604. /PredefinedEncodings
  605. [
  606. [39/quotesingle 96/grave 128/Adieresis/Aring/Ccedilla/Eacute/Ntilde/Odieresis
  607. /Udieresis/aacute/agrave/acircumflex/adieresis/atilde/aring/ccedilla/eacute
  608. /egrave/ecircumflex/edieresis/iacute/igrave/icircumflex/idieresis/ntilde
  609. /oacute/ograve/ocircumflex/odieresis/otilde/uacute/ugrave/ucircumflex
  610. /udieresis/dagger/degree/cent/sterling/section/bullet/paragraph/germandbls
  611. /registered/copyright/trademark/acute/dieresis/.notdef/AE/Oslash
  612. /.notdef/plusminus/.notdef/.notdef/yen/mu/.notdef/.notdef
  613. /.notdef/.notdef/.notdef/ordfeminine/ordmasculine/.notdef/ae/oslash
  614. /questiondown/exclamdown/logicalnot/.notdef/florin/.notdef/.notdef
  615. /guillemotleft/guillemotright/ellipsis/.notdef/Agrave/Atilde/Otilde/OE/oe
  616. /endash/emdash/quotedblleft/quotedblright/quoteleft/quoteright/divide
  617. /.notdef/ydieresis/Ydieresis/fraction/currency/guilsinglleft/guilsinglright
  618. /fi/fl/daggerdbl/periodcentered/quotesinglbase/quotedblbase/perthousand
  619. /Acircumflex/Ecircumflex/Aacute/Edieresis/Egrave/Iacute/Icircumflex
  620. /Idieresis/Igrave/Oacute/Ocircumflex/.notdef/Ograve/Uacute/Ucircumflex
  621. /Ugrave/dotlessi/circumflex/tilde/macron/breve/dotaccent/ring/cedilla
  622. /hungarumlaut/ogonek/caron
  623. StandardEncoding 256 array copy reencode
  624. [1/dotlessi/caron 39/quotesingle 96/grave 
  625. 127/bullet/bullet/bullet/quotesinglbase/florin/quotedblbase/ellipsis
  626. /dagger/daggerdbl/circumflex/perthousand/Scaron/guilsinglleft/OE
  627. /bullet/bullet/bullet/bullet/quoteleft/quoteright/quotedblleft
  628. /quotedblright/bullet/endash/emdash/tilde/trademark/scaron
  629. /guilsinglright/oe/bullet/bullet/Ydieresis/space/exclamdown/cent/sterling
  630. /currency/yen/brokenbar/section/dieresis/copyright/ordfeminine
  631. /guillemotleft/logicalnot/hyphen/registered/macron/degree/plusminus
  632. /twosuperior/threesuperior/acute/mu/paragraph/periodcentered/cedilla
  633. /onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters
  634. /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
  635. /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
  636. /Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash
  637. /Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls/agrave
  638. /aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
  639. /ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde
  640. /ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute
  641. /ucircumflex/udieresis/yacute/thorn/ydieresis
  642. StandardEncoding 256 array copy reencode
  643. ] def
  644. /TZ
  645. {    3 1 roll findfont dup length 3 add dict begin
  646.     {1 index /FID ne {def} {pop pop} ifelse} forall
  647.     currentdict /OrigFontName known not
  648.     {/OrigFontName currentdict /FontName known {/FontName load} {1 index} ifelse def} if
  649.     /FontName exch def
  650.     dup 0 ge {/Encoding PredefinedEncodings 3 -1 roll get def} {pop} ifelse
  651.     counttomark 0 eq {pop} {/Encoding load 256 array copy reencode /Encoding exch def} ifelse
  652.     /FontName load currentdict end definefont pop
  653. } hardbind def
  654. /performfontsubstitution
  655. {    20 dict begin
  656.     /OrigFontName 3 -1 roll def
  657.     counttomark 2 add -1 roll exch 2 index counttomark 1 add 1 roll TZ
  658.     6 1 roll 5 index findfont 1000 scalefont
  659.     /_basefont exch def
  660.     /FontBBox exch def
  661.     /ItalicAngle exch def
  662.     /MissingWidth exch def
  663.     /Widths exch def
  664.     /FirstChar exch def
  665.     /NewItalicMatrix matrix def
  666.     /UnItalicMatrix matrix def
  667.     _basefont /FontInfo known
  668.     {    _basefont /FontInfo get /ItalicAngle known
  669.         {    ItalicAngle 0 eq {/ItalicAngle _basefont /FontInfo get /ItalicAngle get def} if
  670.             NewItalicMatrix 2 ItalicAngle dup 0 lt {neg} if dup sin exch cos div put
  671.             UnItalicMatrix 2 _basefont /FontInfo get /ItalicAngle get dup 0 gt {neg} if dup sin exch cos div put
  672.         } if
  673.     } if
  674.     /_basefont _basefont UnItalicMatrix makefont def
  675.     /FontType 3 def
  676.     /FontMatrix [0.001 0 0 0.001 0 0] def
  677.     /Encoding _basefont /Encoding get def
  678.     /fontbboxisnotallzero FontBBox {0 ne} forall or or or def
  679.     %fontbboxisnotallzero
  680.     %{    gsave NewItalicMatrix setmatrix
  681.     %    _basefont /FontMatrix get concat _basefont /FontBBox get aload pop
  682.     %    newpath 3 index 3 index moveto 1 index 3 index lineto 2 copy lineto 3 index 1 index lineto pop pop pop pop
  683.     %    matrix setmatrix pathbbox grestore
  684.     %    exch pop 3 -1 roll pop
  685.     %    FontBBox 3 get exch div exch FontBBox 1 get exch div
  686.     %    2 copy gt {exch} if pop
  687.     %    /pdfdebug where {/pdfdebug get} {false} ifelse
  688.     %    {    (Vertical adjustment for Font ) print
  689.     %        OrigFontName dup length string cvs print
  690.     %        (: ) print
  691.     %        dup == flush
  692.     %    } if
  693.     %    [1 0 0 5 -1 roll 0 0] _basefont exch makefont
  694.     %    /_basefont exch def
  695.     %} if
  696.     /BuildChar
  697.     {    exch begin
  698.         gsave _basefont setfont ( ) dup 0 3 index put dup stringwidth grestore
  699.         4 -1 roll FirstChar sub dup 0 ge 1 index Widths length lt and
  700.         {Widths exch get} {pop MissingWidth} ifelse dup 0 eq {pop 1 index} if
  701.         dup 4 -1 roll 1 index 0 ne 1 index 0 ne and {div} {pop pop 1} ifelse 3 1 roll exch
  702.         fontbboxisnotallzero
  703.         {FontBBox aload pop}
  704.         {    gsave NewItalicMatrix setmatrix 2 index 1 scale
  705.             _basefont /FontMatrix get concat _basefont /FontBBox get aload pop
  706.             newpath 3 index 3 index moveto 1 index 3 index lineto 2 copy lineto 3 index 1 index lineto pop pop pop pop
  707.             matrix setmatrix pathbbox grestore
  708.         }
  709.         ifelse
  710.         6 copy setcachedevice
  711.         newpath 3 index 3 index moveto 1 index 3 index lineto 2 copy lineto 3 index 1 index lineto clip
  712.         pop pop pop pop pop pop
  713.         NewItalicMatrix concat 1 scale _basefont setfont 0 0 moveto show
  714.         end
  715.     } hardbind def
  716.     currentdict end definefont pop
  717. } bind def
  718. /substfontifneeded
  719. {    1 index
  720.     /resourcestatus where {pop dup /Font resourcestatus {pop pop pop false} {true} ifelse} if
  721.     {dup findfont /FontName get ne} {false} ifelse
  722.     {performfontsubstitution} {TZ 6 {pop} repeat} ifelse
  723. } bind def
  724. /DeviceGray [/DeviceGray] def
  725. /DeviceRGB [/DeviceRGB] def
  726. /DeviceCMYK [/DeviceCMYK] def
  727. /DefaultGray /DeviceGray load def
  728. /DefaultRGB /DeviceRGB load def
  729. L2
  730. {    /DefaultCalRGB
  731.     [    /CIEBasedABC
  732.         2 dict begin
  733.         /MatrixLMN [.4124 .2126 .0193 .3576 .7152 .1192 .1805 .0722 .9505] def
  734.         /WhitePoint [0.9505 1 1.089] def
  735.         currentdict end
  736.     ] def
  737.     /DefaultCalGray
  738.     [    /CIEBasedA
  739.         2 dict begin
  740.         /MatrixLMN [.4124 .2126 .0193 .3576 .7152 .1192 .1805 .0722 .9505] def
  741.         /WhitePoint [0.9505 1 1.089] def
  742.         currentdict end
  743.     ] def
  744.     /initcalcs
  745.     {    /DefaultRGB where {/DefaultRGB get dup isarray {0 get} if} {/DeviceRGB} ifelse
  746.         /DeviceRGB eq {/DefaultRGB /DefaultCalRGB pdfpkgget pdfpkgput} if
  747.         /DeviceRGB /DefaultRGB load pdfpkgput
  748.         /DefaultGray where {/DefaultGray get dup isarray {0 get} if} {/DeviceGray} ifelse
  749.         /DeviceGray eq
  750.         {    /DefaultRGB load 1 get
  751.             dup dup /RangeABC known not exch dup /DecodeABC known not exch /MatrixABC known not and and
  752.             not {pop /DefaultCalGray pdfpkgget 1 get} {0 dict copy} ifelse
  753.             /CIEBasedA exch 2 array astore
  754.             /DefaultGray exch pdfpkgput
  755.         } if
  756.         /DeviceGray /DefaultGray load pdfpkgput
  757.         0 g 0 G
  758.     } def
  759.     /definecolorspaceresource {pdfpkgput} def
  760. }
  761. {    /initcalcs {} def
  762.     /definecolorspaceresource {pop pop} def
  763. }
  764. ifelse
  765. /beginpdf {pdfpkg begin 0 g 0 G []0 d 0 j 0 J 10 M 1 w 0 Tr} def
  766. /endpdf {end} def
  767. end
  768.  
  769. /currentpacking where {pop setpacking}if
  770.